﻿using UnityEngine;
using System.Collections;

public class GameCenterManager
{
    public static void Init ()
    {
		Debug.Log("TJSDK---初始化排行榜");
        #if UNITY_EDITOR
        return;
        #endif
        #if UNITY_IPHONE
        iOSLeaderBoard.GetInstance().Init();
        #endif
        #if google
        GoogleLeaderBoard.Init();
        #endif

    }

    public static void ReportScore (string LeadBoardId , int score)
    {
		Debug.Log(string.Format("TJSDK---提交排行榜({0}:{1})",LeadBoardId,score));
        #if UNITY_EDITOR
        return;
        #endif
        #if UNITY_IPHONE
        iOSLeaderBoard.GetInstance().ReportScore(LeadBoardId, score);
        #endif
        #if google
        GoogleLeaderBoard.ReportScore(LeadBoardId, score);
        #endif
    }

    public static void ShowLeardBoard ()
    {
		Debug.Log("TJSDK---展示排行榜");
        #if UNITY_EDITOR
        return;
        #endif
        #if UNITY_IPHONE
        iOSLeaderBoard.GetInstance().ShowLeaderboard();
        #endif
        #if google
        GoogleLeaderBoard.ShowLeaderboard();
        #endif
    }
}
